package indi.kider.server.applandlord.service.related;


import indi.kider.common.model.apartment.Houses;
import indi.kider.common.model.apartment.HousesMsg;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import pers.vankid.common.model.base.CommonResponse;
import pers.vankid.common.utils.page.PageRequest;
import pers.vankid.common.utils.page.PageResponse;

import java.util.List;

@FeignClient(value = "apartment")
public interface HousesInfer {

    @PostMapping("/apart/houses")
    CommonResponse addHouse(@RequestBody Houses houses);


    @PostMapping("/apart/selectHouseMsgByEnterprise")
    CommonResponse<PageResponse<List<HousesMsg>>> selectHouseMsgByEnterprise(PageRequest<String> request);


    @GetMapping("/houses/{housesId}")
    CommonResponse<HousesMsg> getHousesMsgById(@PathVariable(value = "housesId") Long housesId);
}
